import cv2 as cv
import numpy as np

img = cv.imread('../test_datas/jWithWhiteNoiseLeft.png')
kernel = np.ones((5,5),np.uint8)

tophat = cv.morphologyEx(img, cv.MORPH_TOPHAT, kernel)

opening = cv.morphologyEx(img, cv.MORPH_OPEN, kernel)
imo = img - opening

res = np.hstack((img,opening,imo))

cv.imshow('res',res)

cv.waitKey(0)
cv.destroyAllWindows()
